CC = gcc
CFLAGS = -Wall -Werror -pedantic `pkg-config --cflags --libs gtk+-2.0 gtksourceview-2.0 sqlite3 gthread-2.0` -Wl,--export-dynamic -DVERBOSE -DDEBUG -lccmalloc
OBJS = about_dialog.o main.o main_window.o main_window_menu_edit.o main_window_menu_file.o main_window_menu_help.o main_window_notebook.o main_window_notebook_dispatcher.o main_window_notebook_source_view.o main_window_notebook_tables_list.o main_window_sqlite.o main_window_toolbar.o message_dialog_list.o prefs_manager.o util.o guid.o plugin_loader.o opt_manager.o
GLADE_OBJS = main_window.xml message_dialog_list.xml tables_list.xml

sqlitegtk: ${OBJS} ${GLADE_OBJS}
	${CC} -o sqlitegtk ${CFLAGS} ${OBJS}

main_window.xml: main_window.glade
	gtk-builder-convert main_window.glade main_window.xml

message_dialog_list.xml : message_dialog_list.glade
	gtk-builder-convert message_dialog_list.glade message_dialog_list.xml

tables_list.xml : tables_list.glade
	gtk-builder-convert tables_list.glade tables_list.xml

clean:
	rm -f sqlitegtk ${OBJS} ${GLADE_OBJS}

force_look:
	true
